//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { SmsLog, SmsLogResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooSmsLogList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<SmsLogResponse>(`/uctoo/sms_log/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooSmsLog = async (id: string) => {
  return requestClient.get<SmsLog>(`/uctoo/sms_log/${id}`);
};

export const adductooSmsLog = async (data: Partial<SmsLog>) => {
  return requestClient.post<SmsLog>('/uctoo/sms_log/add', data);
};

export const edituctooSmsLog = async (data: Partial<SmsLog>) => {
  return requestClient.post<SmsLog>('/uctoo/sms_log/edit', data);
};

export const deleteuctooSmsLog = async (id: string) => {
  return requestClient.post<any>('/uctoo/sms_log/del', { id });
};
